class BootStrapForm(object):

    bootstrap_class_exclude = []

    def __init__(self, *args, **kwargs):
        super().__init__(*args, *kwargs)
        # print(self.fields.items())
        for name, field in self.fields.items():
            if name in self.bootstrap_class_exclude:
                field.widget.attrs['class'] = 'color-radio'
                continue
            field.widget.attrs['class'] = 'form-control'
            field.widget.attrs['placeholder'] = '请输入'+field.label
            # field.error_messages['required'] = '%s不能为空' % (field.label, )